package cn.com.vs.service.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.com.vs.service.domain.Comment;
import cn.com.vs.service.domain.Group;
import cn.com.vs.service.domain.Talk;
import cn.com.vs.service.domain.UserData;
import cn.com.vs.service.domain.UserInfo;


public interface BasicSqlMapper {
	
	public UserInfo userLogin(Map<String,Object> params );
	
	public UserInfo getUserInfo( Integer id );
	
	public List<Map<String,?>> getUseId(@Param("bindtype")String bindtype, @Param("bindvalue")String bindvalue);
	
	public List<Map<String,?>> getWechatAccountInfo(Map<String,Object> params);
	
	public int userExistTest( Map<String,Object> params );
	
	public int setUserInfo( Map<String,Object> params );
	
	public int resetPWD( Map<String,Object> params );
	
	public void setUserLoacationID(  Map<String,Object> params );
	
	public Integer getUserLocationID( Map<String,Object> params );
	
	public List<Map<String,?>> selectAllContact( Map<String,Integer> params );
	
	public List<Map<String,?>> syncAllContact( Map<String,Integer> params );
	
	public List<Map<String,?>> selectRunGroup(@Param("userid")Integer userid, @Param("owner")Integer owner,
			@Param("from")Integer from, @Param("limit")Integer limit);
	
	public int bindUserData(UserData data);
	
	public int contactCount(Map<String,Integer> params);
	
	public int syncContactCount(Map<String,Integer> params);
	
	public int runGroupCount(@Param("userid")Integer userid, @Param("owner")Integer owner);
	
	public int addContact(Map<String,Integer> params);
	public int addContactUpdateFlag(Map<String,Integer> params);
	
	public int containsContact(@Param("usertype")Integer usertype, @Param("userid")Integer userid, 
			@Param("contacttype")Integer contacttype, @Param("contactid")Integer contactid, @Param("flag")Integer flag);
	
	public String getUserSettingFlag(@Param("usertype")Integer usertype, @Param("userid")Integer userid);
	
	public int apply( Map<String,Object> params );
	
	public String getUserAccount(int id);
	
	public void delContact(Map<String,Integer> params);
	
	public List<Map<String,?>> getApplications( Map<String,Object> params );
	
	public void processApplication(@Param("appid")Integer appid, @Param("status")Integer status);
	
	public List<Map<String,?>> searchUser(Map<String,?> params);
	
	public int createGroup(Map<String,?> params);
	
	public int updateGroup(@Param("locationid")Integer locid,@Param("groupid")Integer groupid);
	
	public Group getGroupInfo(int id);
	
	public int deleteGroup(Map<String,?> params);
	
	public int talk(Map<String,Object> params);
	
	public int comment(Map<String,Object> params);
	
	public int delTalk(Map<String,Object> params);
	
	public int delTalkComment(Map<String,Object> params);
	
	public List<Talk> getUserTalks(Map<String,Object> params);
	
	public Talk getTalk(int id);
	
	public List<Comment> getTalkCommentList(Map<String,Object> params);
	
	public List<Comment> getTalkComments(int talkid);
	
	public List<Talk> getFriendsTalks(Map<String,Object> params);
	
	public List<Map<String,?>> getContactsWithPhone(String phone);
	
	public List<Talk> syncFriendsTalks(Map<String,Object> params); 
	
	public int deleteAccount(int userid);
	
	public int createAccesslist(Map<String,Object> params);
	
	public void updateTalk(Map<String,Object> params);
	
	public List<Map<String,?>> get3PhotoInAlbum( Map<String,Object> params );
	
	public List<Map<String,?>> getContactsFriends(int userid);
	
	public void addContacts(Map<String,Object> params);
	
	public void deleteContacts(Map<String,Object> params);
	
	public List<Map<String,?>> getLocalUsers(Map<String,Object> params);
}
